import { createStore } from "vuex";
const store = createStore({
  state() {
    return {
      loginStatus: false,
      userName: "",
      userPhone: "",
      userAddress: "",
      selectObj_mail: {},
      selectObj_pickUp: {},
      selectObj_goodsReject: {},
      mailOtherInfo: {},
      goodsRejectedOtherInfo: {},
    };
  },
  getters: {
    getLoginStatus(state) {
      return state.loginStatus;
    },
    getUserName(state) {
      return state.userName;
    },
    getUserPhone(state) {
      return state.userPhone;
    },
    getUserAddress(state) {
      return state.userAddress;
    },
    getSelectObj_mail(state) {
      return state.selectObj_mail;
    },
    getSelectObj_pickUp(state) {
      return state.selectObj_pickUp;
    },
    getSelectObj_goodsReject(state) {
      return state.selectObj_goodsReject;
    },
    getMailOtherInfo(state) {
      return state.mailOtherInfo;
    },
    getGoodsRejectedOtherInfo(state) {
      return state.goodsRejectedOtherInfo;
    },
  },
  mutations: {
    setLoginStatus(state, payLoad) {
      state.loginStatus = payLoad;
    },
    setUserName(state, payLoad) {
      state.userName = payLoad;
    },
    setUserPhone(state, payLoad) {
      state.userPhone = payLoad;
    },
    setUserAddress(state, payLoad) {
      state.userAddress = payLoad;
    },
    setSelectObj_mail(state, payLoad) {
      state.selectObj_mail = payLoad;
    },
    setSelectObj_pickUp(state, payLoad) {
      state.selectObj_pickUp = payLoad;
    },
    setSelectObj_goodsReject(state, payLoad) {
      state.selectObj_goodsReject = payLoad;
    },
    setMailOtherInfo(state, payLoad) {
      state.mailOtherInfo = payLoad;
    },
    setGoodsRejectedOtherInfo(state, payLoad) {
      state.goodsRejectedOtherInfo = payLoad;
    },
  },
});
export default store;
